package com.atguigu.gulimall.product.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.atguigu.gulimall.product.entity.BaseCategory2;
import com.atguigu.gulimall.product.service.BaseCategory2Service;
import com.atguigu.gulimall.product.mapper.BaseCategory2Mapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author nicc
 * @description 针对表【base_category2(二级分类表)】的数据库操作Service实现
 * @createDate 2022-09-26 18:25:42
 */
@Service
public class BaseCategory2ServiceImpl extends ServiceImpl<BaseCategory2Mapper, BaseCategory2>
        implements BaseCategory2Service{

    @Override
    public List<BaseCategory2> getBaseCategory2List(Long c1Id) {
        QueryWrapper<BaseCategory2> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("category1_id", c1Id);
        List<BaseCategory2> list = this.list(queryWrapper);
        return list;
    }
}